package dashboard.constant;

import net.sf.json.JSONArray;

public class IncomeNetflowCityConst {
	public static final JSONArray indexList_EN = JSONArray.fromObject("['cost', 'pv', 'adpv', 'disp', 'click', 'acp','pvr', 'asn', 'cpm1', 'cpm2', 'cpm3', 'ctr1', 'ctr2', 'ctr3']");
	public static final JSONArray indexList_CN = JSONArray.fromObject("['总消费', 'PV', 'ADPV', '展现', '点击','ACP', 'PVR', 'ASN', 'CPM1', 'CPM2', 'CPM3', 'CTR1', 'CTR2', 'CTR3']");
	
	/* 城市各产品趋势图查询 */
	private static final String PATTEN_CityPro = "city_name='%s' AND business_name='%s' AND stat_type='%s'";
	public static String getCityProCol(String dateGroup, String index) {
		return dateGroup+","+index+",product_type";
	}
	
	public static String getCityProCon(String stat_type, String businessName, String cityName){
		return String.format(PATTEN_CityPro, cityName, businessName, stat_type);
	}
	
	
	private static final String CON_CityCmp = "city_name in('%s','%s') AND business_name='%s' AND product_type='%s' AND stat_type='%s'";
	private static final String COL_CityCmp = "%s,city_name,%s";
	/**
	 * 城市对比查询列，查询条件
	 * @param dateGroup
	 * @return
	 */
	public static String getCityCmpCol(String dateGroup, String index){
		return String.format(COL_CityCmp, dateGroup,index);
	}
	
	public static String getCityCmpCon(String stat_type, String businessName,String proType, String city1,String city2){
		return String.format(CON_CityCmp, city1,city2, businessName,proType, stat_type);
	}
}
